package com.ys.nms.module.business.dal.dataobject.router;

import com.ys.nms.framework.mybatis.core.dataobject.BaseSlaveDO;
import com.ys.nms.framework.tenant.core.aop.TenantIgnore;
import lombok.*;
import com.baomidou.mybatisplus.annotation.*;
import java.time.LocalDateTime;

/**
 * 路由 DO
 *
 * @author zzy
 */
@TableName("route")
@KeySequence("route_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 的主键自增；MySQL 可不写
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TenantIgnore
public class RouteDO extends BaseSlaveDO {

    /**
     * ID
     */
    @TableId
    private Integer routeId;

    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    /**
     * 设备ID
     */
    @TableField(value = "device_id")
    private Integer deviceId;

    /**
     * 端口ID
     */
    @TableField(value = "port_id")
    private Integer portId;

    /**
     * SNMP 上下文名称
     */
    @TableField(value = "context_name")
    private String contextName;

    /**
     * 接口索引
     */
    @TableField(value = "inetCidrRouteIfIndex")
    private Long inetCidrRouteIfIndex;

    /**
     * 路由类型（如 1=直连, 2=静态, 3=动态）
     */
    @TableField(value = "inetCidrRouteType")
    private Integer inetCidrRouteType;

    /**
     * 路由协议（如 1=静态, 2=RIP, 3=OSPF, 4=BGP）
     */
    @TableField(value = "inetCidrRouteProto")
    private Integer inetCidrRouteProto;

    /**
     * 下一跳 AS 号
     */
    @TableField(value = "inetCidrRouteNextHopAS")
    private Integer inetCidrRouteNextHopAS;

    /**
     * 路由度量值
     */
    @TableField(value = "inetCidrRouteMetric1")
    private Integer inetCidrRouteMetric1;

    /**
     * 目的地址类型
     */
    @TableField(value = "inetCidrRouteDestType")
    private String inetCidrRouteDestType;

    /**
     * 目的网络地址
     */
    @TableField(value = "inetCidrRouteDest")
    private String inetCidrRouteDest;

    /**
     * 下一跳地址类型
     */
    @TableField(value = "inetCidrRouteNextHopType")
    private String inetCidrRouteNextHopType;

    /**
     * 下一跳 IP 地址
     */
    @TableField(value = "inetCidrRouteNextHop")
    private String inetCidrRouteNextHop;

    /**
     * 策略路由标识
     */
    @TableField(value = "inetCidrRoutePolicy")
    private String inetCidrRoutePolicy;

    /**
     * 目的网络前缀长度
     */
    @TableField(value = "inetCidrRoutePfxLen")
    private Integer inetCidrRoutePfxLen;
}